package fr.poy.test.client;

import java.io.Serializable;
import java.util.Date;

import com.extjs.gxt.ui.client.data.BeanModelTag;
import com.extjs.gxt.ui.client.widget.form.Time;

@SuppressWarnings("serial")
public class Record implements BeanModelTag,Serializable{
    private Date date;
    public Record() {} 
    public Record(Date date) {
        super();
        this.date = date;
    }
    public Date getDate() {
        return date;
    } 
    public void setDate(Date date) {
        this.date = date;
    } 
    public int getDay(){
        return date.getDay();
    } 
    
    public Time getTime() {  
        return new Time(date);//Order BY NOT OK  
    } 
    // design issue ?
    public void setTime(Date time) { 
    	if(time==null) return;
    	date.setHours(time.getHours());
    	date.setMinutes(time.getMinutes()); 
    }
 
}